package com.lwlk.zdk.mapper.pw;

import com.lwlk.zdk.model.pw.pwVehicle;
import com.lwlk.zdk.model.pw.pwVehicleExample;
import com.lwlk.zdk.model.sys.sysUser;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface pwVehicleMapper {
    int countByExample(pwVehicleExample example);

    int deleteByExample(pwVehicleExample example);

    int deleteByPrimaryKey(Integer vehicleId);

    int insert(pwVehicle record);

    int insertSelective(pwVehicle record);

    List<pwVehicle> selectByExample(pwVehicleExample example);

    pwVehicle selectByPrimaryKey(Integer vehicleId);

    int updateByExampleSelective(@Param("record") pwVehicle record, @Param("example") pwVehicleExample example);

    int updateByExample(@Param("record") pwVehicle record, @Param("example") pwVehicleExample example);

    int updateByPrimaryKeySelective(pwVehicle record);

    int updateByPrimaryKey(pwVehicle record);

    List<Map<String,Object>>selectByPlatformId(@Param("platformId")Integer platformId);


    List<Map<String, Object>> selectDimByPlatformId(@Param("platformId") Integer platformId, @Param("vehicleNumber") String vehicleNumber,
                                                    @Param("carType") String carType, @Param("enterprise") String enterprise,
                                                    @Param("networkState") String networkState, @Param("vehicleLicenseColor") String vehicleLicenseColor);

    List<Map<String, Object>> selectVehicleDetail(@Param("vehicleId") Integer vehicleId);

    int selectRegularBus();

    int selectCharteredBus();

    int selectDangerousGoods();

    List<sysUser> selectPlatformMessage(@Param("vehicleId") Integer vehicleId);

    List<pwVehicle> selectVehicleMessage(@Param("vehicleNumber") String vehicleNumber);

    List<Map<String, Object>> selectEnterpriseMessage(@Param("vehicleNumber") String vehicleNumber);

    List<Map<String, Object>> selectVehicleIndustry(@Param("industry") String industry);

    List<Map<String, Object>> selectVehicleIndustryAndIndustry(@Param("isOnline") String isOnline, @Param("industry") String industry);

    List<Map<String, Object>> selectVehicleSum(Date yesterday);

    List<Map<String, Object>> selectVehicleNetworkDay(Date yesterday);

    List<Map<String, Object>> selectLastWeek(Date lastMonday, Date lastWeekend);

    List<Map<String, Object>> selectResponseLastWeek(Date lastMonday, Date lastWeekend);

    List<Map<String, Object>> selectLastMonth(Date first, Date end);

    List<Map<String, Object>> selectEndMonth(Date first, Date end);

    List<Map<String, Object>> selectVehicleEnterprise(@Param("yesterday") Date yesterday, @Param("platformId") Integer platformId);

    List<Map<String, Object>> selectVehicleNetIn(@Param("yesterday") Date yesterday, @Param("platformId") Integer platformId);

    List<Map<String, Object>> selectLastWeekEnterpriseVehicle(@Param("lastMonday") Date lastMonday, @Param("lastWeekend") Date lastWeekend, @Param("platformId") int platformId);

    List<Map<String, Object>> selectLastWeekEnterpriseVehicleResponse(@Param("lastMonday") Date lastMonday, @Param("lastWeekend") Date lastWeekend, @Param("platformId") int platformId);

    List<Map<String, Object>> selectVehicleEnterpriseMonth(@Param("first") Date first, @Param("end") Date end, @Param("platformId") int platformId);

    List<Map<String, Object>> selectVehicleEnterpriseMonthResponse(@Param("first") Date first, @Param("end") Date end, @Param("platformId") int platformId);

    List selectVehicleIds(@Param("platformId") Integer platformId);

    List<Map<String, Object>> selectVehicleStatisticsAll();

    List<Map<String, Object>> selectVehicleStatisticsCategory(@Param("industry") String industry, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<Map<String, Object>> selectVehicleNumber();

    String selectVehicleName(@Param("vId") int vId);

    String selectByVid(@Param("vId") Integer vId);

    String selectDimVehicleNumber(@Param("vehicleNumber") String vehicleNumber);

    List<pwVehicle> findUserByUsername(@Param("vehicleNumber") String vehicleNumber);

    int selectManyVehicleNumber(@Param("vehicleNumber") String vehicleNumber);

    List<Map> selectVehicleId(@Param("vehicleNumber") String vehicleNumber);

    List<Map> selectVehicleIdList(@Param("platformId") Integer platformId);

}